import model from '@backend/model'

class Message{
    constructor( id: number | undefined){

    }
}


export async function get_messages_list( params: MsgListParams = { where: {} } ): Promise< object[]>{
    const { Message: _msg } = await model('Message')
    const list = await _msg.find(Object.assign({
        order: {
            time: "ASC",
        }
    }, params))
    return list
}